
<%@ page import="apralms.System" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'system.label', default: 'System')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-system" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
			</ul>
		</div>
		<div id="show-system" class="content scaffold-show" role="main">
			<h1>
				<g:message code="default.show.label" args="[entityName]" />
				<g:link controller="project" action="show" id="${systemInstance?.project?.id}">${systemInstance?.project?.encodeAsHTML()}</g:link>
			</h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list system">
			
				<g:if test="${systemInstance?.code}">
				<li class="fieldcontain">
					<span id="code-label" class="property-label"><g:message code="system.code.label" default="Code" /></span>
					
						<span class="property-value" aria-labelledby="code-label"><g:fieldValue bean="${systemInstance}" field="code"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${systemInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="system.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${systemInstance}" field="name"/></span>
					
				</li>
				</g:if>			
			
				<g:if test="${systemInstance?.classParas}">
				<li class="fieldcontain">
					<span id="classParas-label" class="property-label"><g:message code="system.classParas.label" default="Class Paras" /></span>
					
						<span class="property-value" aria-labelledby="classParas-label"><g:fieldValue bean="${systemInstance}" field="classParas"/></span>
					
				</li>
				</g:if>
						
				<g:if test="${systemInstance?.k2}">
				<li class="fieldcontain">
					<span id="k2-label" class="property-label"><g:message code="system.k2.label" default="K2" /></span>
					
						<span class="property-value" aria-labelledby="k2-label"><g:fieldValue bean="${systemInstance}" field="k2"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${systemInstance?.ke}">
				<li class="fieldcontain">
					<span id="ke-label" class="property-label"><g:message code="system.ke.label" default="Ke" /></span>
					
						<span class="property-value" aria-labelledby="ke-label"><g:fieldValue bean="${systemInstance}" field="ke"/></span>
					
				</li>
				</g:if>
				
				<g:if test="${0 && systemInstance?.project}">
				<li class="fieldcontain">
					<span id="project-label" class="property-label"><g:message code="system.project.label" default="Project" /></span>
					
						<span class="property-value" aria-labelledby="project-label"><g:link controller="project" action="show" id="${systemInstance?.project?.id}">${systemInstance?.project?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${0 && systemInstance?.products}">
				<li class="fieldcontain">
					<span id="products-label" class="property-label"><g:message code="system.products.label" default="Products" /></span>
					
						<g:each in="${systemInstance.products}" var="p">
						<span class="property-value" aria-labelledby="products-label"><g:link controller="product" action="show" id="${p.id}">${p?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
				
				<g:if test="${0 && systemInstance?.indexes}">
				<li class="fieldcontain">
					<span id="indexes-label" class="property-label"><g:message code="system.indexes.label" default="Indexes" /></span>
					
						<g:each in="${systemInstance.indexes}" var="i">
						<span class="property-value" aria-labelledby="indexes-label"><g:link controller="systemIndex" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
				
				<g:if test="${systemInstance?.dateCreated}">
				<li class="fieldcontain">
					<span id="dateCreated-label" class="property-label"><g:message code="system.dateCreated.label" default="Date Created" /></span>
					
						<span class="property-value" aria-labelledby="dateCreated-label"><g:formatDate date="${systemInstance?.dateCreated}" /></span>
					
				</li>
				</g:if>

				<g:if test="${systemInstance?.lastUpdated}">
				<li class="fieldcontain">
					<span id="lastUpdated-label" class="property-label"><g:message code="system.lastUpdated.label" default="Last Updated" /></span>
					
						<span class="property-value" aria-labelledby="lastUpdated-label"><g:formatDate date="${systemInstance?.lastUpdated}" /></span>
					
				</li>
				</g:if>
			
			<li class="fieldcontain">
				<div id="celebs">
			    	<ul id="accordion">
		        	<li>
		        		<g:set var="productName" value="${message(code: 'product.label', default: 'Product')}" />
		        		<g:message code="default.list.label" args="[productName]" /> [ ${systemInstance.products.size()} ]
		        		<ul>
			        		<g:if test="${systemInstance?.products}">
							<g:each in="${systemInstance.products}" var="s">
							<li>
								<g:link controller="product" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link> ${s?.classParas}
							</li>
							</g:each>
							</g:if>
						</ul>
		        	</li>
		        	</ul> 
		      	</div>		      
			</li>
		      
			</ol>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${systemInstance?.id}" />
					<g:link class="edit" action="edit" id="${systemInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
					<g:link class="add" controller="product" action="create" params="['project.id':systemInstance?.project.id, 'system.id': systemInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'product.label', default: 'Product')])}</g:link>
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
